package com.bytz.modules.cms.order.entity;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bytz.common.aspect.annotation.Dict;
import com.bytz.common.entity.IEntity;
import com.bytz.modules.cms.common.excel.ExcelDictConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 莱宝CMS—订单管理-订单交易支付明细表
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = false)
@TableName("cms_order_pay_detail")
@ApiModel(value = "OrderPayDetail对象", description = "莱宝CMS—订单管理-订单交易支付明细表")
public class OrderPayDetail implements Serializable, IEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "订单ID")
    private String orderId;

    @ApiModelProperty(value = "订单交易ID")
    private String orderPayId;

    @ApiModelProperty(value = "付款方式（1-银联付款；2-汇款单）")
    @ExcelProperty(value = "付款方式", converter = ExcelDictConvert.class)
    @Dict(dicCode = "mall_order_pay_way")
    private String payWay;

    @ApiModelProperty(value = "线下支付记录id")
    private String offlinePayId;

    @ApiModelProperty(value = "交易单号")
    @ExcelProperty(value = "汇款编号")
    private String transactionNumber;

    @ApiModelProperty(value = "付款源")
    @ExcelProperty(value = "付款银行")
    private String paySource;

    @ApiModelProperty(value = "交易产品信息")
    private String commodityMsg;

    @ApiModelProperty(value = "支付金额")
    @ExcelProperty(value = "支付金额")
    private BigDecimal payAmount;

    @ApiModelProperty(value = "商户交易日期", notes = "格式为：yyyyMMDD")
    @ExcelProperty(value = "商户交易日期")
    private String tranDate;

    @ApiModelProperty(value = "超时时间", notes = "格式为 yyyy-MM-DD HH:mm:ss")
    private LocalDateTime expirationTime;

    @ApiModelProperty(value = "完成交易日期", notes = "格式为：yyyyMMDD")
    @ExcelProperty(value = "完成交易日期")
    private String completeDate;

    @ApiModelProperty(value = "完成交易日期时间")
    @ExcelProperty(value = "完成交易日期时间")
    private LocalDateTime completeDateTime;

    @ApiModelProperty(value = "支付结果")
    private String payResponse;

    @ApiModelProperty(value = "错误消息")
    private String errorMessage;

    @ApiModelProperty(value = "状态")
    @Dict(dicCode = "mall_order_pay_status")
    private String status;

    @ApiModelProperty(value = "删除状态")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建人姓名")
    private String createByName;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新人姓名")
    private String updateByName;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;


}
